﻿@model WeProjectsModel.Task

@{
    ViewBag.Title = "Delete";
    int userId = int.Parse(Membership.GetUser().ProviderUserKey.ToString());
    @*不是组长，也不是管理员*@
    if (!Roles.IsUserInRole("sysadmin") && Model.Project.OwnerID != userId)
    {
        Response.Write("当前用户没有权限操作");
        Response.End();
    }
}
@Html.Partial("../project/_projectMenu2")
<h2>
    @Model.Project.Title > 删除任务
</h2>
<div class="bs-callout bs-callout-danger">
    <h4>确定删除此任务？ 相关联文件也将一并删除！@if (Model.Documents != null) { @Model.Documents.Count }</h4>
    <p>任务描述：@Html.DisplayFor(model => model.Description)</p>
    @using (Html.BeginForm())
    {
        @Html.AntiForgeryToken()
        <p>
            <input type="submit" value="Delete" class="btn btn-danger width-20p" />
        </p>
    }
</div>
